import service from '@/utils/request'
// @Tags Erotable
// @Summary 创建易损件信息
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.Erotable true "创建易损件信息"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /ET/createErotable [post]
export const createErotable = (data) => {
  return service({
    url: '/ET/createErotable',
    method: 'post',
    data
  })
}

// @Tags Erotable
// @Summary 删除易损件信息
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.Erotable true "删除易损件信息"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /ET/deleteErotable [delete]
export const deleteErotable = (params) => {
  return service({
    url: '/ET/deleteErotable',
    method: 'delete',
    params
  })
}

// @Tags Erotable
// @Summary 批量删除易损件信息
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除易损件信息"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /ET/deleteErotable [delete]
export const deleteErotableByIds = (params) => {
  return service({
    url: '/ET/deleteErotableByIds',
    method: 'delete',
    params
  })
}

// @Tags Erotable
// @Summary 更新易损件信息
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.Erotable true "更新易损件信息"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /ET/updateErotable [put]
export const updateErotable = (data) => {
  return service({
    url: '/ET/updateErotable',
    method: 'put',
    data
  })
}

// @Tags Erotable
// @Summary 用id查询易损件信息
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data query model.Erotable true "用id查询易损件信息"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /ET/findErotable [get]
export const findErotable = (params) => {
  return service({
    url: '/ET/findErotable',
    method: 'get',
    params
  })
}

// @Tags Erotable
// @Summary 分页获取易损件信息列表
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取易损件信息列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /ET/getErotableList [get]
export const getErotableList = (params) => {
  return service({
    url: '/ET/getErotableList',
    method: 'get',
    params
  })
}

// @Tags Erotable
// @Summary 不需要鉴权的易损件信息接口
// @Accept application/json
// @Produce application/json
// @Param data query wearingpartsReq.ErotableSearch true "分页获取易损件信息列表"
// @Success 200 {object} response.Response{data=object,msg=string} "获取成功"
// @Router /ET/getErotablePublic [get]
export const getErotablePublic = () => {
  return service({
    url: '/ET/getErotablePublic',
    method: 'get',
  })
}
